package whf.framework.service;

import java.util.List;

import whf.framework.exception.FindException;

/**
 * @author wanghaifeng
 *
 */
public interface QueryService<T> {

	/**
	 * 通过属性字符串搜索，字符串描述格式为：{property1::=::property1.value};{property2::>=::property2.value};{property3::<=::property3.value...}
	 * 各属性间关系为and,其中::中间::的是一元操作符
	 * @param propertyString
	 * @return
	 * @throws FindException
	 */
	public List<T> query(String propertyString) throws FindException;
	
	/**
	 * 通过属性字符串搜索
	 * @modify wanghaifeng Nov 24, 2006 11:45:57 AM
	 * @param propertyString
	 * @param start 开始位置
	 * @param pageSize 对象数目
	 * @return
	 * @throws FindException
	 */
	public List<T> query(String propertyString, int start, int pageSize) throws FindException;
	
	public List<T> queryWithoutLazy(String propertyString) throws FindException;
	
	public List<T> queryWithoutLazy(String propertyString, int start, int pageSize) throws FindException;
	
	/**
	 * 获取行数
	 * @modify wanghaifeng Nov 24, 2006 11:46:26 AM
	 * @param propertyString
	 * @return
	 * @throws FindException
	 */
	public int getQueryRowCount(String propertyString) throws FindException;
    
}
